package org.springframework.fusion.geter;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

@Service
public class GeterService {

	@KafkaListener(topics = "kafka-test")
	public void listen(ConsumerRecord<?, ?> record) throws Exception {
		System.out.printf("!!!!!!!!!!!!!!!!!!!!!!!!!"+"topic = %s, offset = %d, value = %s \n", record.topic(), record.offset(), record.value());
	}
	
	@KafkaListener(topics = "kafka-test",groupId = "zhaoxingyan")
	public void listen2(ConsumerRecord<?, ?> record) throws Exception {
		System.out.printf("######################"+"topic = %s, offset = %d, value = %s \n", record.topic(), record.offset(), record.value());
	}

}
